package com.zaprk;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

@WebServlet("/sd01.do")
public class ServletDemo01 extends HttpServlet {
    @Override
    protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        // 获取请求参数
        String username = req.getParameter("username");
        String pwd = req.getParameter("pwd");
        resp.getWriter().println("<h1>HELLO！！！</h1>");
        resp.getWriter().println("<h1>"+ username + ": " + pwd +"</h1>");
    }
}
